<!--{if $_G[wxpay]}-->
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> 
<!--{/if}-->
<style type="text/css">
.hidden{display:none!important}
.bg-white{background:#fff!important}
.emphasize{color:#fa6b4e}
@-webkit-keyframes shake{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}
10%,30%,50%,70%,90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}
20%,40%,60%,80%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}
}
@keyframes shake{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}
10%,30%,50%,70%,90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}
20%,40%,60%,80%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}
}
.shake{-webkit-animation:shake .4s both;animation:shake .4s both}
@-webkit-keyframes fade{0%{opacity:0}
to{opacity:1}
}
@keyframes fade{0%{opacity:0}
to{opacity:1}
}
.icon-clock,.icon-error,.icon-help,.icon-info,.icon-success{display:block;position:relative;width:32px;height:32px;border-radius:100%;border:1px solid #fff}
.icon-success:after{position:absolute;content:'';top:20%;right:40%;width:25%;height:50%;-webkit-transform:rotate(45deg);transform:rotate(45deg);border:solid #fff;border-width:0 1px 1px 0}
.icon-error:after,.icon-error:before{position:absolute;content:'';top:50%;left:0;width:100%;height:1px;background:#fff}
.icon-error:before{-webkit-transform:rotate(45deg) scaleX(.6);transform:rotate(45deg) scaleX(.6)}
.icon-error:after{-webkit-transform:rotate(-45deg) scaleX(.6);transform:rotate(-45deg) scaleX(.6)}
.icon-help:after,.icon-info:after{top:50%;left:50%;font-size:14px;font-style:normal;position:absolute;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}
.icon-help{width:20px;height:20px;border-color:#67789e}
.icon-help:after{content:'?';color:#67789e;font-weight:300}
.icon-help:active{background:#f2f2f2}
.icon-info{width:16px;height:16px;margin-right:.5rem;display:inline-block;border-color:#fa6b4e;vertical-align:middle}
.icon-info:after{content:'!';font-size:12px;font-weight:400}
.cell-box{margin:1.5rem 0;position:relative}
.cell-box:after,.cell-box:before{width:100%;height:1px;background-color:#e5e5e5;content:" ";left:0;position:absolute}
.cell-box:before{top:-1px}
.cell-box:after{bottom:-1px}
@media (-webkit-min-device-pixel-ratio:2){.cell-box:after,.cell-box:before{-webkit-transform:scaleY(.5);transform:scaleY(.5);-webkit-transform-origin:0 0;transform-origin:0 0}
.cell-box:before{-webkit-transform-origin:0 bottom;transform-origin:0 bottom}
.cell-box:after{-webkit-transform-origin:0 top;transform-origin:0 top}
}
.cell,.cell-access{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;min-height:5rem;background:#fff;padding:0 1.8rem;-webkit-box-align:center;-webkit-align-items:center;align-items:center}
.cell-access:not(:first-child),.cell:not(:first-child){position:relative}
.cell-access:not(:first-child):after,.cell:not(:first-child):after{width:100%;height:1px;background-color:#e5e5e5;top:-1px;content:" ";left:0;position:absolute}
@media (-webkit-min-device-pixel-ratio:2){.cell-access:not(:first-child):after,.cell:not(:first-child):after{-webkit-transform:scaleY(.5);transform:scaleY(.5);-webkit-transform-origin:0 0;transform-origin:0 0}
}
.cell-access:active{background:#eee}
.cell-left{-webkit-box-flex:1;-webkit-flex:1;flex:1;margin:0;padding-right:1rem;color:#555}
.cell-left-disabled{color:#999}
.cell-right{text-align:right;color:#888}
.cell-label{width:8.6rem;color:#666;display:inline-block}
.cell-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cell-arrow{position:relative;color:#888;text-align:right;padding-right:1.5rem}
.cell-arrow:after{position:absolute;content:'';top:50%;right:2px;width:6px;height:6px;margin-top:-3px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-top:2px solid #ccc;border-right:2px solid #ccc}
.cell-icon{text-align:center;margin-right:1.6rem}
.cell-icon,.cell-icon img{width:2rem;height:2rem}
.cell-info{color:#5f739a;font-size:1.3rem;padding:0 1.5rem;line-height:4rem;margin-bottom:-1.2rem}
.cell-msg{display:none;color:#fa6b4e;font-size:1.4rem;background-color:#fff;padding:0 1rem .6rem 10.1rem}
.cell-msg span{vertical-align:middle}
.form-label,.form-select{font-weight:700;width:8.6rem;color:#5b5b6a;font-size:1.6rem;word-spacing:1.2rem}
.form-input{-webkit-box-flex:1;-webkit-flex:1;flex:1;border:none;display:block;color:#5b5b6a}
.form-input::-webkit-input-placeholder{color:#bbb;font-weight:400}
.form-clear{display:none}
.form-clear .icon-error{position:absolute;top:50%;left:50%;width:20px;height:20px;margin:-10px 0 0 -10px;border-color:#b2bcd3}
.form-clear .icon-error:after,.form-clear .icon-error:before{background:#b2bcd3}
.form-help .icon-help{position:absolute;top:50%;left:50%;margin:-10px 0 0 -10px}
.form-clear,.form-help{position:relative;width:5rem;height:4rem;margin-right:-1.5rem}
.form-select{position:relative}
.form-select select{border:0;width:100%;-webkit-appearance:none;background-color:transparent;word-spacing:1rem}
.form-select:after{position:absolute;content:'';top:50%;right:2.2rem;width:8px;height:8px;margin-top:-5px;border:solid #ccc;border-width:2px 2px 0 0;-webkit-transform:rotate(135deg);transform:rotate(135deg)}
.nav{position:relative;background:#fafafa;border-bottom:1px solid hsla(0,0%,67%,.28)}
.nav-title{color:#292929;font-size:1.6rem;font-weight:700;text-align:center;line-height:4.2rem}
.nav-back{position:absolute;top:0;left:0;width:5rem;height:100%;z-index:1}
.nav-back:active{background:#eee}
.nav-back:before{position:absolute;content:'';top:50%;left:18px;width:12px;height:12px;margin-top:-6px;border:solid #00bdae;border-width:2px 0 0 2px;-webkit-transform:rotate(315deg);transform:rotate(315deg)}
.btn{color:#fff;padding:0 2rem;font-size:1.6rem;border-radius:3px;line-height:4.8rem;background:#ff9c05;border:1px solid #f5ab2f}
.btn:active{color:hsla(0,0%,100%,.5);background:#dd7a00}
.btn-submit{font-size:1.8rem}
.btn-line{margin:2rem 0;padding:0 1.8rem}
.btn-line .btn{width:100%}
.btn-disabled{border-color:#ffd595}
.btn-disabled,.btn-disabled:active{color:hsla(0,0%,100%,.8);background:#ffd595}
.btn-group{display:-webkit-box;display:-webkit-flex;display:flex;padding:0 1.5rem}
.btn-group .btn{display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1}
.btn-group .btn:not(:last-child){margin-right:1.5rem}
.sms-btn{padding:0;color:#999;width:8rem;background:#fff;font-size:1.2rem;margin-left:1rem;border-color:#999;line-height:2.6rem}
.sms-btn:active{color:#999;background:#eee}
.toast-message{position:fixed;width:100%;top:45%;z-index:100;text-align:center}
.toast-message span{display:inline-block;max-width:80%;border-radius:5px;padding:.8rem 1.8rem;background:rgba(0,0,0,.7);-webkit-animation:toast-fade both .3s;animation:toast-fade both .3s}
.toast-mask{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99;background:transparent}
.toast-box .icon-error,.toast-box .icon-success{margin:0 auto 1.2rem}
.modal{position:fixed;display:none;top:0;left:0;width:100%;height:100%;z-index:100;background:rgba(0,0,0,.3)}
.modal .btn{width:100%;border:none;border-radius:0;background:transparent;color:#00cab7;border-top:1px solid #ddd}
.modal .btn:active{background:#f2f2f2}
.modal .btn-group{padding:0}
.modal .btn-group .btn{margin:0}
.modal .btn-group .btn:not(:last-child){border-right:1px solid #ddd}
.modal-box{position:absolute;top:50%;left:50%;width:90%;max-width:480px;overflow:hidden;border-radius:3px;background-color:#fff;-webkit-transform:translate3d(-50%,-55%,0);transform:translate3d(-50%,-55%,0);box-shadow:0 1px 3px rgba(0,0,0,.2)}
.modal-title{font-weight:700;text-align:center;margin:15px 0 -5px;color:#333}
.modal-body{margin:25px 0;padding:0 20px;line-height:1.5;overflow-y:auto;max-height:200px;text-align:center;color:#7a7a7a}
.modal-img{width:100%;margin-top:.5rem}
.checkbox{height:4rem;position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}
.checkbox input[type=checkbox],.checkbox input[type=radio]{position:absolute;top:0;left:0;margin:0;opacity:0;z-index:9;width:100%;height:100%;-webkit-appearance:none}
.checkbox-icon,.checkbox-icon-round{position:relative;display:block;width:20px;height:20px;background:#fff;-webkit-transition:background .1s;transition:background .1s;border:1px solid #ddd}
.checkbox-icon-round:after,.checkbox-icon:after{position:absolute;content:"";top:3px;right:6px;width:6px;height:10px;border:solid #fff;border-width:0 2px 2px 0;-webkit-transform:rotate(45deg) scale(0);transform:rotate(45deg) scale(0);-webkit-transition:-webkit-transform .2s cubic-bezier(.18,.89,.32,1.28) .1s;transition:-webkit-transform .2s cubic-bezier(.18,.89,.32,1.28) .1s;transition:transform .2s cubic-bezier(.18,.89,.32,1.28) .1s;transition:transform .2s cubic-bezier(.18,.89,.32,1.28) .1s,-webkit-transform .2s cubic-bezier(.18,.89,.32,1.28) .1s}
input:checked+.checkbox-icon,input:checked+.checkbox-icon-round{background:#00cab7;border-color:#00cab7}
input:checked+.checkbox-icon-round:after,input:checked+.checkbox-icon:after{-webkit-transform:rotate(45deg) scale(1);transform:rotate(45deg) scale(1)}
.checkbox-disabled input[type=checkbox],.checkbox-disabled input[type=radio]{display:none}
.checkbox-disabled span.checkbox-icon{background:#f2f2f2;border-color:#ddd;display:none}
.checkbox-disabled span.checkbox-icon:after{border-color:#ddd}
.checkbox-disabled .cell-label,.checkbox-disabled .checkbox-label{color:#aaa;font-weight:400}
.checkbox-icon-round{border-radius:50%}
.password-handy{position:relative;height:5rem;margin:1rem 1.5rem;overflow:hidden}
.ph-hidden-input,.ph-security{height:5rem}
.ph-hidden-input{z-index:10;width:100%;opacity:.01;border:none;overflow:hidden;position:absolute;color:transparent;box-sizing:content-box;-webkit-appearance:none}
.ph-hidden-input-focus{padding:0 50px 0 200px;left:-300px}
.ph-security{position:absolute;width:100%;display:-webkit-box;display:-webkit-flex;display:flex;background:#fff;border-radius:3px;border:1px solid #ddd;-webkit-transition:border-color .1s;transition:border-color .1s}
.ph-security li{position:relative;-webkit-box-flex:1;-webkit-flex:1;flex:1;width:16.66666667%;height:5rem}
.ph-security li:not(:first-child){border-left:1px solid #ddd}
.ph-security i{display:none;position:absolute;top:50%;left:50%;width:.8rem;height:.8rem;background:#000;border-radius:.8rem;margin:-.4rem 0 0 -.4rem}
.ph-active{border:1px solid #ff9c05}
.ph-info,.ph-subinfo{color:#555;line-height:1;text-align:center;margin-bottom:1.5rem}
.ph-info{font-size:16px;margin-top:4rem}
.ph-subinfo{font-size:13px}
.in-countdown{display:none;color:#666;text-align:center;vertical-align:center;padding-top:1rem;height:5rem;font-size:1.2rem;background:#f9f9fc}
.in-countdown div{line-height:1.5rem;height:1.5rem}
.in-timeout{padding-top:.7rem;font-size:1.3rem}
.in-num{display:inline-block;width:1.4rem;color:#fafafa;background-color:#000;text-align:center}
.in-num+.in-num{margin-left:.2rem}
.in-colon{display:inline-block;width:1.3rem;color:#333}
.in-order-summary{display:-webkit-box;display:-webkit-flex;display:flex;padding-right:1.8rem;margin-bottom:-.3rem;-webkit-box-align:center;-webkit-align-items:center;align-items:center;height:8.4rem;background:#f2f2f4 url('') repeat-x 0 0;background-size:auto 8.4rem}
.in-avatar{width:10.4rem;height:4rem;text-align:center}
.in-avatar img{height:4rem;width:4rem;border-radius:2rem;font-size:1.3rem}
.in-order-desc{-webkit-box-flex:1;-webkit-flex:1;flex:1}
.in-bottom-line{background:transparent url('') repeat-x 0 100%;padding-bottom:.2rem}
.in-order-fee{font-size:2.1rem;line-height:2rem}
.in-order-title{font-weight:400;font-size:1.2rem}
.in-credit{width:22px;position:static}
.in-credit-fee{font-size:1.6rem}
.in-pay-type{min-height:6rem}
.in-pay-title{color:#333;line-height:1;padding-top:1rem;font-size:1.6rem}
.in-pay-info{color:#999;font-size:1.2rem;line-height:2rem;padding:.4rem 0 .6rem}
.in-pay-recommend{color:#ff9c05;padding:1px 2px;margin-right:.3rem;border:1px solid #ff9c05;border-radius:.2rem}
.in-pay-method .checkbox{position:static;width:22px}
.in-pay-type-folded{display:none}
.in-pay-type-unstable .in-pay-info{color:#f90}
.in-pay-type-weak .in-pay-title{color:#999}
.in-pay-type-weak .in-pay-info{color:#eb3d2b}
.in-pay-type-weak input[type=radio]{display:none}
.in-pay-type-weak:active{background:none}
.in-show-more{display:none;text-align:center;min-height:4rem;color:#999}
.in-show-more span{position:relative;padding-right:2rem;line-height:4rem}
.in-show-more span:after{position:absolute;content:'';top:50%;right:0;width:1rem;height:1rem;margin-top:-.9rem;-webkit-transform:rotate(225deg);transform:rotate(225deg);border:solid #999;border-width:2px 0 0 2px}
.in-need-pay{font-size:2.6rem;margin-left:.5rem}
.in-confirm,.in-need-pay{vertical-align:middle}
.sb-tab{background:#fff;padding:.6rem 1rem;margin-bottom:1rem;border-bottom:1px solid #e5e5e5}
.sb-tab .btn{font-size:1.4rem;line-height:2.8rem;border-color:#2eb8a8}
.sb-tab .btn,.sb-tab .btn:active{color:#2eb8a8;background:#fff}
.sb-tab .btn:first-child{margin-right:-1px;border-radius:3px 0 0 3px}
.sb-tab .btn:last-child{margin-left:-1px;border-radius:0 3px 3px 0}
.sb-tab .sb-active,.sb-tab .sb-active:active{color:#fff;background:#2eb8a8}
.sb-debit{display:none}
.sb-subtitle{color:#666;font-size:1.3rem;margin:-.5rem 1.5rem}
.sb-bank-icon{width:3rem;height:3rem;margin-right:1rem}
.sb-bank-weak{min-height:4rem;padding:.4rem 1.5rem}
.sb-bank-weak .cell-left{color:#999}
.sb-status-info{color:red;font-size:1.2rem}
.cb-amount{font-size:1.6rem;margin-bottom:-1rem;background:transparent;min-height:3.2rem;margin-top:.5rem}
.vc-factor-box{margin:.5rem 0;margin-bottom:-1rem}
.vc-factor-box:after,.vc-factor-box:before{display:none}
.vc-readonly{color:#5b5b6a;font-size:1.6rem;min-height:3.2rem;line-height:3.2rem;background:transparent}
.vc-readonly:after,.vc-readonly:before{display:none}
.vc-agreement-box{padding:0 1.5rem;margin-top:1.5rem;color:gray}
.vc-agreement-box p{margin:0;font-size:1.3rem}
.vc-agreement-box a{text-decoration:none;color:#586b95}
.wx-body{text-align:center;padding:10rem 0 5rem}
.wx-body .btn-group{padding:0 2.5rem}
.wx-jump{font-weight:700;margin:2rem 0 9rem}
.wx-info{color:#a8a8a8;font-size:1.4rem;margin:0 12% 2rem}
.wx-error,.wx-success{padding:0;background:#fff;line-height:3.4rem}
.wx-success{color:#ff9019;border-color:#ff9019}
.wx-success:active{color:#ff9019;background:#f2f2f2}
.wx-error{color:#999;border-color:#999}
.wx-error:active{color:#999;background:#f2f2f2}
.wx-balls{position:relative;width:80%;height:2rem;margin:0 auto}
.wx-balls i{position:absolute;left:50%;width:2rem;height:2rem;border-radius:100%;-webkit-animation:ball-animation both ease 1.2s infinite;animation:ball-animation both ease 1.2s infinite}
.wx-balls i:nth-child(1){margin-left:-5rem}
.wx-balls i:nth-child(2){margin-left:-1rem;-webkit-animation-delay:.4s;animation-delay:.4s}
.wx-balls i:nth-child(3){margin-left:3rem;-webkit-animation-delay:.8s;animation-delay:.8s}
@-webkit-keyframes ball-animation{0%,to{background:#ec653d}
25%,75%{background:#ff9d3c}
50%{background:#f8bb52}
}
@keyframes ball-animation{0%,to{background:#ec653d}
25%,75%{background:#ff9d3c}
50%{background:#f8bb52}
}
</style>
<!--{if $member[money] > 0}-->
<div class="cell-box">
	<div class="cell">
		<div class="cell-left">
			<span class="cell-label in-credit-label">{lang dzapp_base:my_money}</span>
			<span class="in-credit-fee"><em>$_G[setting][dzapp_base_currency]</em>$member[money]</span>
		</div>
		<div class="checkbox in-credit "><input type="checkbox" name="use_money" id="use_money" value="$member[money]"><span class="checkbox-icon"></span></div>
	</div>
</div>
<!--{/if}-->
<div class="in-pay-method cell-box" style="display: block;">
	<!--{if $_G[wxpay]}-->
	<div class="in-pay-type cell-access">
		<div class="cell-icon"><img src="http://p0.meituan.net/pay/weixin2-2.png" alt="{lang dzapp_wxpay:wxpay}"></div>
		<div class="cell-left">
			<div class="in-pay-title cell-ellipsis">{lang dzapp_wxpay:wxpay}</div>
			<div class="in-pay-info cell-ellipsis"><span class="in-amount-info">$_G[cache][plugin][dzapp_wxpay][description]</span></div>
		</div>
		<div class="checkbox"><input type="radio" name="bank_type" value="wxpay" checked="checked"><span class="checkbox-icon-round"></span></div>
	</div>
	<!--{else}-->
	<div class="in-pay-type cell-access">
		<div class="cell-icon"><img src="http://p0.meituan.net/pay/alipay2-2.png" alt="{lang dzapp_alipay:alipay}"></div>
		<div class="cell-left">
			<div class="in-pay-title cell-ellipsis">{lang dzapp_alipay:alipay}</div>
			<div class="in-pay-info cell-ellipsis"><span class="in-amount-info">$_G[cache][plugin][dzapp_alipay][description]</span></div>
		</div>
		<div class="checkbox"><input type="radio" name="bank_type" value="alipay" checked="checked"><span class="checkbox-icon-round"></span></div>
	</div>
	<!--{/if}-->
</div>
<div class="btn-line"><button class="btn btn-submit" style="display: none"><span class="in-confirm">{lang dzapp_base:pay_confirm}</span><!--{if $total}--><span class="in-need-pay" style="display: inline-block;"><em>$_G[setting][dzapp_base_currency]</em>$total</span><!--{/if}--></button></div>
<script type="text/javascript">
$('#use_money').on('click', function() {
	$('#use_money').attr('checked', true);
});
</script>
<!--{if $_G[wxpay]}-->
<script type="text/javascript">
wx.config({
	//debug: true,
	appId: '$_G[appId]',
	timestamp: '$_G[timestamp]',
	nonceStr: '$_G[nonceStr]',
	signature: '$_G[signature]',
	jsApiList: ['chooseWXPay']
});
wx.ready(function () {
	$(".btn-submit").show();
	$("#payform").on('submit', function() {
		if($money - $total == 0 && $('#use_money').attr('checked')) return true;
		var formobj = $('#payform');
		$.ajax({
			type:'POST',
			url: formobj.attr('action'),
			data:formobj.serialize(),
			dataType:'json',
			success: function(s) {
				wx.chooseWXPay({
					timestamp: s.timeStamp, 
					nonceStr: s.nonceStr, 
					package: s.package, 
					signType: s.signType, 
					paySign: s.paySign, 
					success: function (res) {
						window.location.href = s.href;
					}
				});
			},
		});
		return false;
	});
});
</script>
<!--{/if}-->